package pl.koziolekweb.loggerservice;

public final class Log4jAdapter implements LoggerFactoryAdapter<org.apache.log4j.Logger> {
	
	public org.apache.log4j.Logger getLogger(Object... factoryArguments) {
		org.apache.log4j.Logger logger = null;
		if (factoryArguments.length <= 0)
			logger = org.apache.log4j.Logger.getLogger(Object.class);
		if (factoryArguments[0] instanceof Class)
			logger = org.apache.log4j.Logger.getLogger((Class<?>) factoryArguments[0]);
		if (factoryArguments[0] instanceof String)
			logger = org.apache.log4j.Logger.getLogger(factoryArguments[0].toString());

		return logger;
	}
}